	LOCAL_ARM_MODE := arm

	VMCSX_DIR		:= $(MSP_HOME)/dag/vmcsx

ifeq ($(BRCM_V3D_OPT),true)
	CLIENT_DIRECT	:= TRUE
	CLIENT_DIRECT_MULTI := TRUE
else
	CLIENT_DIRECT	:= FALSE
endif
#	CLIENT_DIRECT_MULTI := TRUE
#	CLIENT_IPC	:= TRUE
#	CLIENT_IPC_NO_VCHIQ := TRUE

	INCPATH			:=	$(VMCSX_DIR)/.
	INCPATH			+=	$(VMCSX_DIR)/helpers/vc_image
#	INCPATH			+=	$(VMCSX_DIR)/interface/vcos/mobcom_rtos
	INCPATH			+=	$(VMCSX_DIR)/interface/vcos/pthreads
	INCPATH			+=	$(VMCSX_DIR)/interface/khronos/include
	INCPATH			+=	$(VMCSX_DIR)/middleware/khronos/common
	INCPATH			+=	$(VMCSX_DIR)/middleware/khronos/common/2708/platform
	INCPATH			+=	$(VMCSX_DIR)/middleware/khronos/vg/2708/platform
	INCPATH			+=	$(VMCSX_DIR)/vcfw/drivers/chip
	INCPATH			+=	$(VMCSX_DIR)/vcinclude
	INCPATH			+=	$(VMCSX_DIR)/vcinclude/dummy
	INCPATH			+=	$(STD_INCPATH)

	CC32FLAGS_TMP	:=	$(subst --kandr_include, ,$(STD_CC32FLAGS))
	CC32FLAGS		:=	$(subst --sys_include, ,$(CC32FLAGS_TMP))
	CC32FLAGS		+=  -O3
#	CC32FLAGS		+=  -O2 -Otime
	CC32FLAGS		+=	-D__CC_ARM
	CC32FLAGS		+=	-D__VIDEOCORE4__
	CC32FLAGS		+=	-D__HERA_V3D__
#	CC32FLAGS		+=	-DKHRN_PLATFORM_VCOS_NO_MALLOC
#	CC32FLAGS		+=	-DEGL_SERVER_SMALLINT
#	CC32FLAGS		+=	-DVCOS_WANT_TLS_EMULATION
#	CC32FLAGS		+=  -DGLXX_NO_VERTEX_CACHE
#	CC32FLAGS		+=  -DNDEBUG
#	CC32FLAGS		+=	-DKHRN_LLAT_NO_THREAD
	CC32FLAGS		+=	-DBCG_FB_LAYOUT
	CC32FLAGS		+=	-DUSE_FAST_PATH
	CC32FLAGS		+=	-DBCM_COMP_USE_RELOC_HEAP
	CC32FLAGS		+=	-DHAVE_PRCTL
ifeq ($(BRCM_V3D_OPT),true)
	CC32FLAGS += -DBRCM_V3D_OPT=1
endif

ifneq ($(BASEBAND_CHIP),ATHENA)
ifneq ($(BASEBAND_CHIP),RHEA)
	CC32FLAGS		+=	-D__BCM2708A0__
endif
endif

ifeq ($(BASEBAND_CHIP),ATHENA)
	CC32FLAGS		+=	-D_ATHENA_
endif

ifeq ($(CHIP_REVISION),20)
	CC32FLAGS		+=	-DCHIP_REVISION=20
	CC32FLAGS		+=	-DBCM_COMP_ATHENA_AXI2AHB_BUG_WORKAROUND
endif

ifeq ($(CLIENT_DIRECT),TRUE)
	CC32FLAGS		+=	-DRPC_DIRECT
  ifeq ($(CLIENT_DIRECT_MULTI),TRUE)
  	CC32FLAGS		+= -DRPC_DIRECT_MULTI
  endif
else
	CC32FLAGS		+=	-DKHRN_VCOS_VCHIQ
	VCHI_LOCAL_HOST_PORT	:= TRUE
	RPC_TO_VCHI		:= TRUE
endif

ifeq ($(CLIENT_IPC_NO_VCHIQ),TRUE)
	CC32FLAGS		+=	-DCLIENT_IPC_NO_VCHIQ
	CC32FLAGS		+=	-DCLIENT_THREAD_IS_PROCESS
endif

ifeq ($(VCHI_LOCAL_HOST_PORT),TRUE)
	CC32FLAGS		+=  -DVCHI_LOCAL_HOST_PORT
endif

ifeq ($(RPC_TO_VCHI),TRUE)
	CC32FLAGS		+=  -DRPC_TO_VCHI
endif

ifeq ($(RSO_ARGB8888_TEXTURE),TRUE)
	CC32FLAGS		+=	-DRSO_ARGB8888_TEXTURE
endif

ifeq ($(DIRECT_RENDERING),TRUE)
	CC32FLAGS		+=  -DDIRECT_RENDERING
endif

ifeq ($(TARGET_CPU),Cortex-A9)
	CC32FLAGS		+=	-D__ARM_NEON__
endif

ifeq ($(SIMPENROSE), true)
	CC32FLAGS		+=	-DSIMPENROSE -U__BCM2708A0__ -DSPAPI= -std=c99 -UEGL_SERVER_SMALLINT
endif

	CXXFLAGS		:=	$(CC32FLAGS)
